﻿
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sproc_CM_AddFile]') AND type in (N'P', N'PC'))
    DROP PROCEDURE [dbo].[sproc_CM_AddFile];
GO
CREATE PROCEDURE [dbo].[sproc_CM_AddFile]
@path nvarchar(500),
@type nvarchar(50),
@pertainid int,
@extension nvarchar(100)
AS

    INSERT INTO UDS_CM_Attachment(Path,Type,PertainID,Extension)
    VALUES(@path,@type,@pertainid,@extension)
    RETURN @@IDENTITY